home *** CD-ROM | disk | FTP | other *** search
/ Creative Review 30 / Creative-Review-CD-ROM-30.iso / mac / More / Simon Tyszko / atomic / 00001_Script_1 next >
Text File  |  1997-10-01  |  3KB  |  121 lines

  1. global gballlist
  2. global ghinc
  3. global gvinc
  4. global gobj
  5. global gnumofcastslist
  6. global gstartingcastnumlist
  7.  
  8. global multimixer
  9.  
  10.  
  11. global gonionjungle
  12.  
  13. ---------------------------------------
  14. ---------------------------------------
  15. on hinit
  16.   
  17.   
  18.   
  19.   
  20.   
  21.   preloadmember 7, 185
  22.   
  23.   
  24.   --this holds the starting castnum for sprites
  25.   set gstartingcastnumlist = [22,42,62,82,102,122,142,152,191,211]
  26.   
  27.   --this holds the total for each cast sequence
  28.   set gnumofcastslist = [12,12,12,12,12,12,6,6,12,12]
  29.   
  30.   set gballlist =[ ]
  31.   preloadcast 7
  32.   puppetsound 1,7
  33.   repeat with spritenum = 1 to 10
  34.     add gballlist birth(script "ball",spritenum,¼
  35.                         getat(gstartingcastnumlist,spritenum),¼
  36.                         getat(gnumofcastslist,spritenum))
  37.     put spritenum
  38.   end repeat
  39.   
  40.   set gonionjungle = 182
  41.   puppetsound (15, gonionjungle)
  42.   
  43. end hinit
  44. ---------------------------------------
  45. ---------------------------------------
  46. on hupdate
  47.   
  48.   
  49.   --  updatestage
  50.   
  51.   --this is where you play a audio iff as background
  52.   --don't use a sound channel which is already used up
  53.   
  54.   if not soundbusy (15) then puppetsound (15, gonionjungle)
  55.   
  56.   repeat with n = 1 to count(gballlist)
  57.     set ball = getat(gballlist,n)
  58.     hcalculateincrement
  59.     --    adjustsize ball
  60.     move ball ghinc, gvinc
  61.     makesound ball
  62.     animate ball
  63.     --    blend ball
  64.   end repeat
  65.   
  66. end hupdate
  67.  
  68.  
  69.  
  70. ---------------------------------------
  71. ---------------------------------------
  72.  
  73. on hcalculateincrement
  74.   set ghinc = (((the stageright-the stageleft)/2) - the mouseh)/3
  75.   set gvinc = (((the stagebottom-the stagetop)/2) - the mousev)/3
  76. end hcalculateincrement
  77. ---------------------------------------
  78. ---------------------------------------
  79. on hstop
  80.   
  81. end
  82. ---------------------------------------
  83. ---------------------------------------
  84. on hrestart
  85.   
  86. end hrestart
  87. ---------------------------------------
  88. ---------------------------------------
  89.  
  90.  
  91. ---------------------------------------
  92. --------------------------------------
  93. on hclean
  94.   
  95. end hclean
  96.  
  97. ---------------------------------------
  98. --------------------------------------
  99.  
  100. on stopmovie
  101.   
  102. end stopmovie
  103.  
  104. ---------------------------------------
  105. --------------------------------------
  106.  
  107. on keydown
  108.   tell the stage to movetofront getat(the windowlist,1)
  109. end keydown
  110.  
  111.  
  112. --on mousedown 
  113. --  
  114. --  set gonionjungle = random(3) +181
  115. --  
  116. --  
  117. --end mousedown
  118. --
  119. --
  120.  
  121.